import { RouteRecordRaw } from 'vue-router';

/**
 * 建议：路由 path 路径与文件夹名称相同，找文件可浏览器地址找，方便定位文件位置
 *
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      isLink：        是否超链接菜单，开启外链条件，`1、isLink: 链接地址不为空 2、isIframe:false`
 *      isHide：        是否隐藏此路由
 *      isKeepAlive：   是否缓存组件状态
 *      isAffix：       是否固定在 tagsView 栏上
 *      isIframe：      是否内嵌窗口，开启条件，`1、isIframe:true 2、isLink：链接地址不为空`
 *      roles：         当前路由权限标识，取角色管理。控制路由显示、隐藏。超级管理员：admin 普通角色：common
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

// 扩展 RouteMeta 接口
declare module 'vue-router' {
	interface RouteMeta {
		title?: string;
		isLink?: string;
		isHide?: boolean;
		isKeepAlive?: boolean;
		isAffix?: boolean;
		isIframe?: boolean;
		roles?: string[];
		icon?: string;
	}
}

/**
 * 定义动态路由
 * 前端添加路由，请在顶级节点的 `children 数组` 里添加
 * @description 未开启 isRequestRoutes 为 true 时使用（前端控制路由），开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
 * @description 各字段请查看 `/@/views/system/menu/component/addMenu.vue 下的 ruleForm`
 * @returns 返回路由菜单数据
 */
export const dynamicRoutes: Array<RouteRecordRaw> = [
	{
		path: '/',
		name: '/',
		component: () => import('/@/layout/index.vue'),
		redirect: '/smartLargeScreen',
		meta: {
			isKeepAlive: true,
		},
		children: [
			{
				path: '/smartLargeScreen',
				name: 'smartLargeScreen',
				component: () => import('/@/views/smartLargeScreen/mainStationScreenNews.vue'),
				redirect: '/smartLargeScreen/mainStationScreenNews',
				meta: {
					title: 'message.router.smartLargeScreen',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/smartLargeScreen/mainStationScreenNews',
						name: 'mainStationScreenNews',
						component: () => import('/@/views/smartLargeScreen/mainStationScreenNews.vue'),
						meta: {
							title: 'message.router.mainStationScreenNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},

			{
				path: '/manage',
				name: 'manage',
				component: () => import('../views/manage/powerStation/index.vue'),
				redirect: '/manage/powerStation/index',
				meta: {
					title: 'message.router.manage',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/manage/powerStation/index',
						name: 'powerStation',
						component: () => import('../views/manage/powerStation/index.vue'),
						meta: {
							title: 'message.router.powerStation',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/manage/device/index',
						name: 'device',
						component: () => import('../views/manage/device/index.vue'),
						meta: {
							title: 'message.router.device',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},

			{
				path: '/gatherControlManage',
				name: 'gatherControlManage',
				component: () => import('/@/views/gatherControlManage/mainStationComprehensiveNews.vue'),
				redirect: '/gatherControlManage/mainStationComprehensiveNews',
				meta: {
					title: 'message.router.gatherControlManage',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/gatherControlManage/mainStationComprehensiveNews',
						name: 'mainStationComprehensiveNews',
						component: () => import('/@/views/gatherControlManage/mainStationComprehensiveNews.vue'),
						meta: {
							title: 'message.router.mainStationComprehensiveNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},

						children: [
							{
								path: '/gatherControlManage/oneStandNews',
								name: 'oneStandNews',
								component: () => import('/@/views/gatherControlManage/oneStandNews.vue'),
								meta: {
									title: 'message.staticRoutes.oneStandNews',
									isLink: '',
									isHide: true,
									isKeepAlive: false,
									isAffix: false,
									isIframe: false,
									roles: ['admin', 'common'],
								},
							},
							{
								path: '/gatherControlManage/oneInverterNews',
								name: 'oneInverterNews',
								component: () => import('/@/views/gatherControlManage/oneInverterNews.vue'),
								meta: {
									title: 'message.staticRoutes.oneInverterNews',
									isLink: '',
									isHide: true,
									isKeepAlive: false,
									isAffix: false,
									isIframe: false,
									roles: ['admin', 'common'],
								},
							},
						],
					},
					{
						path: '/gatherControlManage/eachSubStationNews',
						name: 'eachSubStationNews',
						component: () => import('/@/views/gatherControlManage/eachSubStationNews.vue'),
						meta: {
							title: 'message.router.eachSubStationNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/systemChart',
				name: 'systemChart',
				component: () => import('/@/views/systemChart/systemChartShow.vue'),
				redirect: '/systemChart/systemChartShow',
				meta: {
					title: 'message.router.systemChart',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/systemChart/systemChartShow',
						name: 'systemChartShow',
						component: () => import('/@/views/systemChart/systemChartShow.vue'),
						meta: {
							title: 'message.router.systemChart',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/deviceManage',
				name: 'deviceManage',
				component: () => import('/@/views/deviceManage/inverterNews.vue'),
				redirect: '/deviceManage/inverterNews',
				meta: {
					title: 'message.router.deviceManage',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/deviceManage/inverterNews',
						name: 'inverterNews',
						component: () => import('/@/views/deviceManage/inverterNews.vue'),
						meta: {
							title: 'message.router.inverterNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/inverterAnalysis',
						name: 'inverterAnalysis',
						component: () => import('/@/views/deviceManage/inverterAnalysis.vue'),
						meta: {
							title: 'message.router.inverterAnalysis',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/combinerBox',
						name: 'combinerBox',
						component: () => import('/@/views/deviceManage/combinerBox.vue'),
						meta: {
							title: 'message.router.combinerBox',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/electMeterNews',
						name: 'electMeterNews',
						component: () => import('/@/views/deviceManage/electMeterNews.vue'),
						meta: {
							title: 'message.router.electMeterNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/protectNews',
						name: 'protectNews',
						component: () => import('/@/views/deviceManage/protectNews.vue'),
						meta: {
							title: 'message.router.protectNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/boxTransformerNews',
						name: 'boxTransformerNews',
						component: () => import('/@/views/deviceManage/boxTransformerNews.vue'),
						meta: {
							title: 'message.router.boxTransformerNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/weatherStandNews',
						name: 'weatherStandNews',
						component: () => import('/@/views/deviceManage/weatherStandNews.vue'),
						meta: {
							title: 'message.router.weatherStandNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceManage/dcScreenNews',
						name: 'dcScreenNews',
						component: () => import('/@/views/deviceManage/dcScreenNews.vue'),
						meta: {
							title: 'message.router.dcScreenNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/alarmShow',
				name: 'alarmShow',
				component: () => import('/@/views/alarmShow/realTimeAlarmNews.vue'),
				redirect: '/alarmShow/realTimeAlarmNews',
				meta: {
					title: 'message.router.alarmShow',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/alarmShow/realTimeAlarmNews',
						name: 'realTimeAlarmNews',
						component: () => import('/@/views/alarmShow/realTimeAlarmNews.vue'),
						meta: {
							title: 'message.router.realTimeAlarmNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/alarmShow/historyEventsNews',
						name: 'historyEventsNews',
						component: () => import('/@/views/alarmShow/historyEventsNews.vue'),
						meta: {
							title: 'message.router.historyEventsNews',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/regularReport',
				name: 'regularReport',
				component: () => import('/@/views/regularReport/pvStandClassQuery.vue'),
				redirect: '/regularReport/pvStandClassQuery',
				meta: {
					title: 'message.router.regularReport',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/regularReport/pvStandClassQuery',
						name: 'pvStandClassQuery',
						component: () => import('/@/views/regularReport/pvStandClassQuery.vue'),
						meta: {
							title: 'message.router.pvStandClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/inverterClassQuery',
						name: 'inverterClassQuery',
						component: () => import('/@/views/regularReport/inverterClassQuery.vue'),
						meta: {
							title: 'message.router.inverterClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},

					{
						path: '/regularReport/combinerBoxClassQuery',
						name: 'combinerBoxClassQuery',
						component: () => import('/@/views/regularReport/combinerBoxClassQuery.vue'),
						meta: {
							title: 'message.router.combinerBoxClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/electMeterNewsClassQuery',
						name: 'electMeterNewsClassQuery',
						component: () => import('/@/views/regularReport/electMeterNewsClassQuery.vue'),
						meta: {
							title: 'message.router.electMeterNewsClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/protectClassQuery',
						name: 'protectClassQuery',
						component: () => import('/@/views/regularReport/protectClassQuery.vue'),
						meta: {
							title: 'message.router.protectClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/boxTransformerClassQuery',
						name: 'boxTransformerClassQuery',
						component: () => import('/@/views/regularReport/boxTransformerClassQuery.vue'),
						meta: {
							title: 'message.router.boxTransformerClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/weatherStandClassQuery',
						name: 'weatherStandClassQuery',
						component: () => import('/@/views/regularReport/weatherStandClassQuery.vue'),
						meta: {
							title: 'message.router.weatherStandClassQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/regularReport/classNewsQuery',
						name: 'classNewsQuery',
						component: () => import('/@/views/regularReport/classNewsQuery.vue'),
						meta: {
							title: 'message.router.classNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/comprehendReport',
				name: 'comprehendReport',
				component: () => import('/@/views/comprehendReport/pvDayPowerQuery.vue'),
				redirect: '/comprehendReport/pvDayPowerQuery',
				meta: {
					title: 'message.router.comprehendReport',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/comprehendReport/pvDayPowerQuery',
						name: 'pvDayPowerQuery',
						component: () => import('/@/views/comprehendReport/pvDayPowerQuery.vue'),
						meta: {
							title: 'message.router.pvDayPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/pvMonthPowerQuery',
						name: 'pvMonthPowerQuery',
						component: () => import('/@/views/comprehendReport/pvMonthPowerQuery.vue'),
						meta: {
							title: 'message.router.pvMonthPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/pvYearPowerQuery',
						name: 'pvYearPowerQuery',
						component: () => import('/@/views/comprehendReport/pvYearPowerQuery.vue'),
						meta: {
							title: 'message.router.pvYearPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/inverterDayPowerQuery',
						name: 'inverterDayPowerQuery',
						component: () => import('/@/views/comprehendReport/inverterDayPowerQuery.vue'),
						meta: {
							title: 'message.router.inverterDayPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/inverterMonthPowerQuery',
						name: 'inverterMonthPowerQuery',
						component: () => import('/@/views/comprehendReport/inverterMonthPowerQuery.vue'),
						meta: {
							title: 'message.router.inverterMonthPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/inverterYearPowerQuery',
						name: 'inverterYearPowerQuery',
						component: () => import('/@/views/comprehendReport/inverterYearPowerQuery.vue'),
						meta: {
							title: 'message.router.inverterYearPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/electricMeterDayPowerQuery',
						name: 'electricMeterDayPowerQuery',
						component: () => import('/@/views/comprehendReport/electricMeterDayPowerQuery.vue'),
						meta: {
							title: 'message.router.electricMeterDayPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/electricMeterMonthPowerQuery',
						name: 'electricMeterMonthPowerQuery',
						component: () => import('/@/views/comprehendReport/electricMeterMonthPowerQuery.vue'),
						meta: {
							title: 'message.router.electricMeterMonthPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/comprehendReport/electricMeterYearPowerQuery',
						name: 'electricMeterYearPowerQuery',
						component: () => import('/@/views/comprehendReport/electricMeterYearPowerQuery.vue'),
						meta: {
							title: 'message.router.electricMeterYearPowerQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/curveAnalyse',
				name: 'curveAnalyse',
				component: () => import('/@/views/curveAnalyse/lineAnalyseQuery.vue'),
				redirect: '/curveAnalyse/lineAnalyseQuery',
				meta: {
					title: 'message.router.curveAnalyse',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/curveAnalyse/lineAnalyseQuery',
						name: 'lineAnalyseQuery',
						component: () => import('/@/views/curveAnalyse/lineAnalyseQuery.vue'),
						meta: {
							title: 'message.router.lineAnalyseQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/orderSystem',
				name: 'orderSystem',
				component: () => import('/@/views/orderSystem/orderNewsQuery.vue'),
				redirect: '/orderSystem/orderNewsQuery',
				meta: {
					title: 'message.router.orderSystem',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/orderSystem/orderNewsQuery',
						name: 'orderNewsQuery',
						component: () => import('/@/views/orderSystem/orderNewsQuery.vue'),
						meta: {
							title: 'message.router.orderNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/orderSystem/orderNewsCreate',
						name: 'orderNewsCreate',
						component: () => import('/@/views/orderSystem/orderNewsCreate.vue'),
						meta: {
							title: 'message.router.orderNewsCreate',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/powerRate',
				name: 'powerRate',
				component: () => import('/@/views/powerRate/powerOrderQuery.vue'),
				redirect: '/powerRate/powerOrderQuery',
				meta: {
					title: 'message.router.powerRate',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/powerRate/powerOrderQuery',
						name: 'powerOrderQuery',
						component: () => import('/@/views/powerRate/powerOrderQuery.vue'),
						meta: {
							title: 'message.router.powerOrderQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/powerRate/powerOrderCreate',
						name: 'powerOrderCreate',
						component: () => import('/@/views/powerRate/powerOrderCreate.vue'),
						meta: {
							title: 'message.router.powerOrderCreate',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/deviceCheck',
				name: 'deviceCheck',
				component: () => import('/@/views/deviceCheck/codeNewsQuery.vue'),
				redirect: '/deviceCheck/codeNewsQuery',
				meta: {
					title: 'message.router.deviceCheck',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/deviceCheck/codeNewsQuery',
						name: 'codeNewsQuery',
						component: () => import('/@/views/deviceCheck/codeNewsQuery.vue'),
						meta: {
							title: 'message.router.codeNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceCheck/checkNewsQuery',
						name: 'checkNewsQuery',
						component: () => import('/@/views/deviceCheck/checkNewsQuery.vue'),
						meta: {
							title: 'message.router.checkNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/deviceCheck/checkNewsEnter',
						name: 'checkNewsEnter',
						component: () => import('/@/views/deviceCheck/checkNewsEnter.vue'),
						meta: {
							title: 'message.router.checkNewsEnter',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/propertyManage',
				name: 'propertyManage',
				component: () => import('/@/views/propertyManage/deviceNewsQuery.vue'),
				redirect: '/propertyManage/deviceNewsQuery',
				meta: {
					title: 'message.router.propertyManage',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/propertyManage/deviceNewsQuery',
						name: 'deviceNewsQuery',
						component: () => import('/@/views/propertyManage/deviceNewsQuery.vue'),
						meta: {
							title: 'message.router.deviceNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/propertyManage/inverterNewsEnter',
						name: 'inverterNewsEnter',
						component: () => import('/@/views/propertyManage/inverterNewsEnter.vue'),
						meta: {
							title: 'message.router.inverterNewsEnter',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/senderNews',
				name: 'senderNews',
				component: () => import('/@/views/senderNews/senderNewsQuery.vue'),
				redirect: '/senderNews/senderNewsQuery',
				meta: {
					title: 'message.router.senderNews',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/senderNews/senderNewsQuery',
						name: 'senderNewsQuery',
						component: () => import('/@/views/senderNews/senderNewsQuery.vue'),
						meta: {
							title: 'message.router.senderNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
					{
						path: '/senderNews/senderWrite',
						name: 'senderWrite',
						component: () => import('/@/views/senderNews/senderWrite.vue'),
						meta: {
							title: 'message.router.senderWrite',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/systemDefend',
				name: 'systemDefend',
				component: () => import('../views/systemDefend/deviceNewsDefendQuery.vue'),
				redirect: '/systemDefend/deviceNewsDefendQuery',
				meta: {
					title: 'message.router.systemDefend',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
					icon: 'iconfont icon-gongju',
				},
				children: [
					{
						path: '/systemDefend/deviceNewsDefendQuery',
						name: 'deviceNewsDefendQuery',
						component: () => import('../views/systemDefend/deviceNewsDefendQuery.vue'),
						meta: {
							title: 'message.router.deviceNewsQuery',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin', 'common'],
							icon: 'iconfont icon-biaodan',
						},
					},
				],
			},
			{
				path: '/system',
				name: 'system',
				component: () => import('/@/layout/routerView/parent.vue'),
				redirect: '/system/menu',
				meta: {
					title: 'message.router.system',
					isLink: '',
					isHide: false,
					isKeepAlive: true,
					isAffix: false,
					isIframe: false,
					roles: ['admin'],
					icon: 'iconfont icon-xitongshezhi',
				},
				children: [
					{
						path: '/system/menu',
						name: 'systemMenu',
						component: () => import('/@/views/system/menu/index.vue'),
						meta: {
							title: 'message.router.systemMenu',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin'],
							icon: 'iconfont icon-caidan',
						},
					},
					{
						path: '/system/role',
						name: 'systemRole',
						component: () => import('/@/views/system/role/index.vue'),
						meta: {
							title: 'message.router.systemRole',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin'],
							icon: 'ele-ColdDrink',
						},
					},
					{
						path: '/system/user',
						name: 'systemUser',
						component: () => import('/@/views/system/user/index.vue'),
						meta: {
							title: 'message.router.systemUser',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin'],
							icon: 'iconfont icon-icon-',
						},
					},
					// {
					// 	path: '/system/dept',
					// 	name: 'systemDept',
					// 	component: () => import('/@/views/system/dept/index.vue'),
					// 	meta: {
					// 		title: 'message.router.systemDept',
					// 		isLink: '',
					// 		isHide: false,
					// 		isKeepAlive: true,
					// 		isAffix: false,
					// 		isIframe: false,
					// 		roles: ['admin'],
					// 		icon: 'ele-OfficeBuilding',
					// 	},
					// },
					{
						path: '/system/dic',
						name: 'systemDic',
						component: () => import('/@/views/system/dic/index.vue'),
						meta: {
							title: 'message.router.systemDic',
							isLink: '',
							isHide: false,
							isKeepAlive: true,
							isAffix: false,
							isIframe: false,
							roles: ['admin'],
							icon: 'ele-SetUp',
						},
					},
				],
			},
			{
				path: '/personal',
				name: 'personal',
				component: () => import('/@/views/personal/index.vue'),
				meta: {
					title: 'message.router.personal',
					isLink: '',
					isHide: true,
					isKeepAlive: false,
					isAffix: false,
					isIframe: false,
					roles: ['admin', 'common'],
				},
			},
		],
	},
];

// 定义404界面
export const notFoundAndNoPower = [
	{
		path: '/:path(.*)*',
		name: 'notFound',
		component: () => import('/@/views/error/404.vue'),
		meta: {
			title: 'message.staticRoutes.notFound',
			isHide: true,
		},
	},
];

/**
 * 定义静态路由（默认路由）
 * 此路由不要动，前端添加路由的话，请在 `dynamicRoutes 数组` 中添加
 * @description 前端控制直接改 dynamicRoutes 中的路由，后端控制不需要修改，请求接口路由数据时，会覆盖 dynamicRoutes 第一个顶级 children 的内容（全屏，不包含 layout 中的路由出口）
 * @returns 返回路由菜单数据
 */
export const staticRoutes: Array<RouteRecordRaw> = [
	{
		path: '/login',
		name: 'login',
		component: () => import('/@/views/login/login.vue'),
		meta: {
			title: '登录',
		},
	},
	{
		path: '/register',
		name: 'Register',
		component: () => import('/@/views/login/register.vue'),
		meta: {
			title: '登录',
		},
	},
	{
		path: '/termService',
		name: 'termService',
		component: () => import('/@/views/login/termService.vue'),
		meta: {
			title: '服务条款',
		},
	},
	{
		path: '/privacyPolicy',
		name: 'privacyPolicy',
		component: () => import('/@/views/login/privacyPolicy.vue'),
		meta: {
			title: '隐私政策',
		},
	},
	{
		path: '/forgotPassword',
		name: 'forgotPassword',
		component: () => import('/@/views/login/forgotPassword.vue'),
		meta: {
			title: '忘记密码',
		},
	},
	/**
	 * 提示：写在这里的为全屏界面，不建议写在这里
	 * 请写在 `dynamicRoutes` 路由数组中
	 */
];
